<?php
$server = new swoole_server('0.0.0.0',3333);

$port = $server->addlistener('0.0.0.0',7777,SWOOLE_SOCK_TCP);

$server->on('connect', function (\Swoole\Server $ser, $fd) {
    //获取服务器状态
    //var_dump($ser->stats());

});
$server->on('receive',function(\Swoole\Server $serv,$fd,$reactor_id,$data){
    echo 'login....'.PHP_EOL;
    dump($serv->getClientInfo($fd));
});
$server->start();